home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / X11 / Fresco / build / Unix / config / cf / bsdLib.rules < prev    next >
Text File  |  1995-07-12  |  3KB  |  117 lines

  1. XCOMM $XConsortium: bsdLib.rules,v 1.1 94/03/29 15:34:45 gildea Exp $
  2.  
  3. /*
  4.  * NetBSD/FreeBSD shared library rules
  5.  */
  6.  
  7. #ifndef HasSharedLibraries
  8. #define HasSharedLibraries YES
  9. #endif
  10. #ifndef ForceNormalLib
  11. #define ForceNormalLib YES
  12. #endif
  13. #ifndef SharedDataSeparation
  14. #define SharedDataSeparation NO
  15. #endif
  16. #ifndef SharedCodeDef
  17. #define SharedCodeDef
  18. #endif
  19. #ifndef SharedLibraryDef
  20. #define SharedLibraryDef -DBSDSHLIB
  21. #endif
  22. #ifndef ShLibIncludeFile
  23. #define ShLibIncludeFile <bsdLib.tmpl>
  24. #endif
  25. #ifndef SharedLibraryLoadFlags
  26. #define SharedLibraryLoadFlags -Bshareable
  27. #endif
  28. #ifndef PositionIndependentCFlags
  29. #define PositionIndependentCFlags -fpic
  30. #endif
  31.  
  32. /*
  33.  * InstallSharedLibrary - generate rules to install the shared library.
  34.  */
  35. #ifndef InstallSharedLibrary
  36. #define InstallSharedLibrary(libname,rev,dest)                @@\
  37. install:: Concat(lib,libname.so.rev)                    @@\
  38.     MakeDir($(DESTDIR)dest)                        @@\
  39.     $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest 
  40. @@\
  41.  
  42. #endif /* InstallSharedLibrary */
  43.  
  44. /*
  45.  * SharedCplusplusLibraryTarget - generate rules to create a shared C++
  46.  * library; use $(CXXLINK) instead of $(LD) in case the library needs
  47.  * global constructors to be called.
  48.  *
  49.  * Not tested yet; send any bug fixes to fresco@x.org.
  50.  */
  51. #ifndef SharedCplusplusLibraryTarget
  52. #define SharedCplusplusLibraryTarget(libname,rev,solist,down,up,need_libs) @@\
  53. AllTarget(Concat(lib,libname.so.rev))                    @@\
  54.                                     @@\
  55. Concat(lib,libname.so.rev):  solist                    @@\
  56.     $(RM) $@                            @@\
  57.     $(CXXLINK) -o $@ $(SHLIBLDFLAGS) solist need_libs        @@\
  58.                                     @@\
  59. clean::                                    @@\
  60.     $(RM) Concat(lib,libname.so.rev)
  61.  
  62. #endif /* SharedCplusplusLibraryTarget */
  63.  
  64. /*
  65.  * NormalSharedLibraryTarget - generate rules to create a shared library;
  66.  * build it into a different name so that the we do not hose people by having
  67.  * the library gone for long periods.
  68.  */
  69. #ifndef SharedLibraryTarget
  70. #define SharedLibraryTarget(libname,rev,solist,down,up)            @@\
  71. AllTarget(Concat(lib,libname.so.rev))                    @@\
  72.                                     @@\
  73. Concat(lib,libname.so.rev):  solist                    @@\
  74.     $(RM) $@~                            @@\
  75.     (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\
  76.     $(RM) $@                            @@\
  77.     $(MV) $@~ $@                            @@\
  78.     LinkBuildLibrary($@)                        @@\
  79.                                     @@\
  80. clean::                                    @@\
  81.     $(RM) Concat(lib,libname.so.rev)
  82.  
  83. #endif /* SharedLibraryTarget */
  84.  
  85. /*
  86.  * SharedLibraryDataTarget - generate rules to create shlib data file;
  87.  */
  88. #ifndef SharedLibraryDataTarget
  89. #define SharedLibraryDataTarget(libname,rev,salist)
  90. #endif /* SharedLibraryDataTarget */
  91.  
  92. #ifndef InstallSharedLibraryData
  93. #define InstallSharedLibraryData(libname,rev,dest)
  94. #endif /* InstallSharedLibraryData */
  95.  
  96. /*
  97.  * SharedLibReferences - variables for shared libraries
  98.  */
  99. #ifndef SharedLibReferences
  100. #define SharedLibReferences(varname,libname,libsource,revname,rev)    @@\
  101. revname = rev                                @@\
  102. Concat3(DEP,varname,LIB) = SharedLibDependencies(libname,libsource,revname) @@\
  103. Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname)        @@\
  104. LintLibReferences(varname,libname,libsource)
  105. #endif
  106.  
  107. /*
  108.  * SharedDSLibReferences - variables for shared libraries
  109.  */
  110. #ifndef SharedDSLibReferences
  111. #define SharedDSLibReferences(varname,libname,libsource,revname,rev)    @@\
  112. revname = rev                                @@\
  113. Concat3(DEP,varname,LIB) = SharedDSLibDependencies(libname,libsource,revname) @@\
  114. Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) Concat3(Shared,libname,Reqs)        @@\
  115. LintLibReferences(varname,libname,libsource)
  116. #endif
  117.